package interfaces.impl;

import operations.Operation;
import topic.Topic;
import accessers.DataReader;
import interfaces.Subscriber;

public class SubscriberImpl implements Subscriber{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Topic topic = null;
	private DataReader listener = null;
	private Operation operation = null;

	public void publish(Operation operation) {
		this.operation = operation;
		listener.signale();
	}

	public Operation read() {
		return operation;
	}

	public void setDataReaderListener(DataReader listener) {
		this.listener = listener;
	}

}
